<?php

require 'blog-detail.php';

?>

<?php foreach ($comments as $comment): ?>
<?php endforeach; ?>

<?php echo $pagination; ?>

<form id="comment" action="comment-save.php" method="post">
    <div class="form-group">
        <label for="name">姓名</label>
        <input type="text" class="form-control" id="name" name="name">
    </div>
    <div class="form-group">
        <label for="content">评论内容</label>
        <textarea rows="3" class="form-control" id="content" name="content"></textarea>
    </div>
    <button type="submit" class="btn btn-primary">提交</button>
    <input type="hidden" name="post_id" value="<?php echo get('id'); ?>">
    <?php echo csrf_token_hidden_input_html() ?>
</form>